How to work with a function that can be either sync or async

welcome to shbcf.ru